﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ET.DBCommon.Model
{
    /// <summary>
    /// 结果任务
    /// </summary>
    public class ExamresultsTestQuestionTaskModel : NotifyPropertyChanged
    {
        public ExamresultsTestQuestionTaskModel()
        {
            this.Status = "未执行";
        }
        /// <summary>
        /// 编号
        /// </summary>
        public int ID { get; set; }
        /// <summary>
        /// 所属场景
        /// </summary>
        public int ExamResultsTestQuestionID { get; set; }
        /// <summary>
        /// 执行状态
        /// 1/已执行
        /// 2/未执行
        /// 3/执行中
        /// </summary>
        private string m_Status;
        public string Status
        {
            get
            {
                return this.m_Status;
            }
            set
            {
                this.m_Status = value;
                this.OnPropertyChanged("ExecState");
            }
        }
        /// <summary>
        /// 序号
        /// </summary>
        public int Order { get; set; }
        /// <summary>
        /// 任务描述
        /// </summary>
        public string Tooltips { get; set; }
        /// <summary>
        /// 前提条件
        /// 1/列车位置（车次/逻辑区段）
        /// 2/事前步骤（步骤编号/延迟时间）
        /// 3/设备状态（设备类型/设备编号/设备状态）
        /// </summary>
        public string Prerequisite { get; set; }
        /// <summary>
        /// 响应时常
        /// </summary>
        public int ResponseTime { get; set; }
        /// <summary>
        /// 延续时长
        /// </summary>
        public int TimeOut { get; set; }

        /// <summary>
        /// 是否为主任务步骤
        /// </summary>
        public bool IsMain { get; set; }

        /// <summary>
        /// 步骤列表
        /// </summary>
        public ObservableCollection<ExamresultsTestQuestionTaskStepModel> m_ExamresultsTestQuestionTaskStepModels;
        /// <summary>
        /// 任务列表
        /// </summary>
        public ObservableCollection<ExamresultsTestQuestionTaskStepModel> ExamresultsTestQuestionTaskStepModels
        {
            get { return this.m_ExamresultsTestQuestionTaskStepModels; }
            set
            {
                this.m_ExamresultsTestQuestionTaskStepModels = value;
                this.OnPropertyChanged("ExamresultsTestQuestionTaskStepModels");
            }
        }

        private decimal m_TotalScore;
        /// <summary>
        /// 任务得分
        /// </summary>
        public decimal TotalScore
        {
            get
            {
                return this.m_TotalScore;
            }
            set
            {
                this.m_TotalScore = value;
                this.OnPropertyChanged("TotalScore");
            }
        }

        /// <summary>
        /// 互斥任务
        /// </summary>
        public int MutexTask { get; set; }

        /// <summary>
        /// 事后任务
        /// </summary>
        public int AfterTask { get; set; }

        /// <summary>
        /// 事后任务间隔（秒）
        /// </summary>
        public int AfterTaskInterval { get; set; }

        /// <summary>
        /// 与试卷任务表关联外键
        /// </summary>
        public int TestQuestionTaskID { get; set; }

        /// <summary>
        /// 界面排序
        /// </summary>
        public int UIOrder { get; set; }
        /// <summary>
        /// 主线分支 Add by lukun
        /// </summary>
        public string Branch { get; set; }
    }
}
